/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.mycompany.webantons;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import com.google.common.base.Charsets;
import com.google.common.hash.Hashing;
import java.text.MessageFormat;

/**
 *
 * @author johan
 */
@ManagedBean()
@SessionScoped

public class Hasher {
    
     String hashedpassword;
    
    
    public static String getHash(String password) 
    {
   
        String hash
                = Hashing.sha256()
                .hashString(password, Charsets.UTF_8).toString();

        

        return hash;
        
    }
    
   
   
    
    
}
